<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Article>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <% 
        var category = (Category)ViewData["Category"];
        Ajax.EnabledCustomization(); 
    %>
    <div style="width: 700px; float: left;">
        <div class="ui-widget-zone" id="zone0" style="float: none; margin-bottom: 5px;">
            <div>
                <table style="width: 100%;">
                    <tr>
                        <td>
                            <h2 style="margin-top: 0px; overflow: hidden; padding-left: 10px;">
                                <%:ViewData["Title"] %></h2>
                        </td>
                        <td align="right" style="width: 180px;white-space:nowrap;">
                            <%:Html.ImageLinkList()
                              .Options(opts =>
                                                    {
                                                        opts.CssClass = "ui-helper-reset";
                                                        opts.ItemCssStyleText = "float:left;margin-right:5px;";
                                                        opts.ImageCssStyleText = "float:left;margin-right:2px;";
                                                    })
                               .Items(items => {
                                   items.Add(Html.Global("Publishing", "Subscription")+ ":", Url.Content("~/Content/Images/rss.png"));
                                   items.Add("Rss","",Url.Action("RssFeed","Category",new{Area="Publishing",id=category.ID}));
                                   items.Add("Atom", "", Url.Action("AtomFeed", "Category", new { Area = "Publishing", id = category.ID }));
                               })
                               .Render() 
                              
                            %>
                        </td>
                    </tr>
                </table>
            </div>
            <% if (!string.IsNullOrEmpty(category.Description))
               { %>
            <div style="">
                <% if (WebContext.Current.Web.IsRoot)
                   { %>
                <%:MvcHtmlString.Create(HttpContext.Current.Server.HtmlDecode(category.Description))%>
                <%} %>
            </div>
            <%} %>
            <% Html.RenderPartial("SummaryList", Model); %>
        </div>
        <div class="ui-widget-zone" id="zone1" style="float: left; min-width: 330px;">
        </div>
        <div class="ui-widget-zone" id="zone2" style="float: left; min-width: 330px;">
        </div>
    </div>
    <div class="ui-widget-zone" id="zone3" style="float: left; min-width: 220px; max-width: 222px">
        <%-- if (WebContext.Current.Web.IsRoot)
           { %>
        <% Ajax.RenderWidget(new Guid("87DA82B4-CCB3-4646-A842-892F2B885BD6"), "CategoryNav", "Category", "DNA.Mvc", "zone3", 0, new { IsDeletable = false });%>
        <% Ajax.RenderWidget(new Guid("1CAB20E3-AEBD-43DD-A957-2E916D7A6C58"), "TagCloud", "Article", "DNA.Mvc", "zone3", 1, new { IsDeletable = false, Title = "Tags" }); %>
        <% Ajax.RenderWidget(new Guid("E3C6BFD6-03C1-4CB1-ABE1-24ED1150D131"), "HeadLines", "Article", "DNA.Mvc", "zone3", 2, new { IsDeletable = false, Title = "Newest articles", TextLen = 28, ShowAuthor = false, ShowDate = false }); %>
        <%}
           else
           { %>
        <% Ajax.RenderWidget(new Guid("25DEAB73-B36E-4995-A60D-33E7A06135EE"), "CategoryNav", "Category", "DNA.Mvc", "zone3", 0, new { IsDeletable = false });%>
        <% Ajax.RenderWidget(new Guid("DB9DE6B0-5FA9-446D-BA06-FA412618AEF6"), "Archives", "Article", "DNA.Mvc", "zone3", 1, new { CategoryID = WebSite.CurrentWeb().DefaultCategory().ID }); %>
        <% Ajax.RenderWidget(new Guid("342222B1-525E-4149-AFDB-0B0449251004"), "TagCloud", "Article", "DNA.Mvc", "zone3", 2, new { IsDeletable = false, Title = "Tags" }); %>
        <%} --%></div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <%var category = (Category)ViewData["Category"]; %>
    <link rel="alternate" type="application/rss+xml" href="<%:Url.Action("RssFeed", "Category", new
                       {
                           Area = "Publishing",
                           website = WebContext.Current.Web.Name,
                           id = category.ID
                       }) %>" title="<%:category.Title+" Posts Feed" %>" />
    <link rel="alternate" type="application/atom+xml" href="<%:Url.Action("AtomFeed", "Category", new
                       {
                           Area = "Publishing",
                           website = WebContext.Current.Web.Name,
                           id = category.ID
                       }) %>" title="<%:category.Title+" Posts Feed" %>" />
</asp:Content>
